package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"ho/api/internal/config"
	"ho/horpc/horpcclient"
)

type ServiceContext struct {
	Config config.Config
	HoRpc  horpcclient.Horpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config: c,
		HoRpc:  horpcclient.NewHorpc(zrpc.MustNewClient(c.HoRpc)),
	}
}
